debian/rules: warn if there are leftover daemon processes after testing
authorSimon McVittie <smcv@debian.org>
Thu, 31 Mar 2016 07:52:22 +0000 (08:52 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 31 Mar 2016 07:52:22 +0000 (08:52 +0100)
debian/changelog
debian/rules

index 542fb381b5e00dc337866d9bb83f9e4a033a2a04..64477d3aac109ccd929010e346c3141889ccd3ce 100644 (file)
@@ -9,6 +9,7 @@ ostree (2016.4-1) UNRELEASED; urgency=medium
   * Fix ITP bug number in changelog (was #813308, should have been #697477)
   * debian/control: build-depend on attr, for the tests (only required if
     /var/tmp supports extended attributes)
+  * debian/rules: warn if there are leftover daemon processes after testing
 
  -- Simon McVittie <smcv@debian.org>  Mon, 28 Mar 2016 12:02:59 +0100
 
index 1e6ac4aab446910c24663015f7c439b1130bd6b9..38f748e54485aee9b81c0d8216e43cf4435d8cf1 100755 (executable)
@@ -24,6 +24,14 @@ override_dh_auto_configure:
                $(NULL)
        chmod +x tests/*.js
 
+override_dh_auto_test:
+       dh_auto_test
+       if pgrep lt-ostree || pgrep --full "gpg-agent --homedir /var/tmp/tap-test."; then \
+               echo "WARNING: daemon processes were leaked"; \
+               pgrep gpg-agent | xargs --no-run-if-empty ps ww; \
+               pgrep lt-ostree | xargs --no-run-if-empty ps ww; \
+       fi
+
 override_dh_install:
        rm -f debian/tmp/usr/lib/*/*.la
        rm -f debian/tmp/usr/lib/ostree/installed-tests/*.la